The present invention relates to an image processing apparatus and method of encoding progressive build-up image data, and decoding the encoded image data.
The concept of progressive build-up coding technique relating to the present invention is first described. The technique is described in Technical Survey "Progressive Build-up Coding Scheme for Bi-level Images--JBIG (Joint Bi-level Image Group) Algorithm" in The Journal of the Institute of Image Electronics Engineer of Japan Vol. 20, No. 1. The object of the progressive build-up coding is to grasp an entire image in a short time, and the conceptual diagram is shown in FIG. 40. The resolution of an input image is assumed to be 400 dpi to simplify the description. First, on the encoder side, the processing of reducing the image (a rectangular square 241 in FIG. 40) to 1/2 in width and length is repeated n times, and n reduction images where the smallest size of the image is 2.sup.-n of the input image are generated. The input image is referred to as a "zero layer" image, and the image at the lowest resolution is referred to as an "n-th layer" image. In the Figure, since the reduction processing is repeated five times, the input image is reduced to 2.sup.-5, and the fifth layer image (an rectangular square 242 in FIG. 40) is obtained. As a reduction processing, a method capable of suppressing deterioration of information is adapted so that the information of an entire image at the low resolution such as 12.5 dpi or 25 dpi can be grasped (Note that the PRES method is adopted in the JBIG algorithm).
The n-th layer image at the lowest resolution is independently encoded, and an image at other layer is encoded with reference to the image whose resolution is one layer lower than the image to be encoded. That is, the i-th layer image (i=0, 1, . . . , n-1) is encoded with reference to the (i+1)-th layer image. In the JBIG algorithm, encoding is performed by arithmetic coding. In the JBIG algorithm, the encoding unit is a stripe obtained by dividing an image in a sub-scanning direction. At the leading portion of the data in the JBIG algorithm, the header data containing such information as the image size of the zero layer image, stripe width, number of layers is provided, and the obtained encoded data follows.
When decoded, the encoded data of the n-th layer image, the highest layer, is decoded first. The display is started with the image at the lowest resolution. The display is performed so that the resolution increases as information is supplied by enlarging the j-th layer image (j=n-1, . . . , 1, 0) to 2.sup.j in the width and length. That is, the fifth layer image is enlarged to 2.sup.5, and then, the fourth layer image is enlarged to 2.sup.4.
In the conventional technique, a problem arises when the image is displayed while being decoded. In general, the resolution of a display is lower than that of the printer. For example, in a 17-inch display for a work-station, the number of pixels is 1280.times.1024, and the resolution is approximately 100 dpi which is considerably lower than that of the printer. In the case of FIG. 40, an image greater than 80 mm.times.50 mm cannot be displayed at the resolution of 400 dpi. Accordingly, it is difficult to display the original image based on the resolution of the display.
Furthermore, if the image at each layer is decoded, and then displayed, a user is uncomfortable because progressive stages in the decoding processing cannot be shown until the developing at each layer has ended.
Furthermore, various images at the zero layer image such as an original image whose resolution is different cannot be dealt with.
Still further, when encoded, the image display of the image varies when an original image is reduced at different magnifying power. However, in the conventional technique, the image cannot be confirmed during the encoding processing, and the image is confirmed at the decoding side. Accordingly, switching of the binarizing method at the reading of the image data or density adjustment to perform under color removal is difficult.